﻿using Architecture.Repository.Interface.Traceability;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Traceability.Domain.BreedDomain;
using Traceability.Domain.SlaughterDomain;

namespace Architecture.Repository.Impl.Traceability
{
    /// <summary>
    /// 屠宰仓储
    /// </summary>
    public class SlaughterRepository : BaseRepository<Slaughter>, ISlaughterReposiotry
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="context">上下文</param>
        public SlaughterRepository(EFCoreContext context) : base(context)
        {
        }

        public async Task<int> AddSlaughter(Slaughter slaughter)
        {
            return await base.AddAsync(slaughter);
        }

        public async Task<List<Slaughter>> GetSlaughterList()
        {
            return await base.GetAllAsync();
        }

        public async Task<int> UpdateTraceabilities(Slaughter slaughter)
        {
            return await base.UpdateAsync(slaughter);
        }

        public async Task<Slaughter> BackInfoSlaughter(int slaughterId)
        {
            return await base.GetModelAsync(slaughterId);
        }

    }
}
